const express = require('express')
// 创建路由对象
const router = express.Router()

// 导入用户路由处理函数模块
const publishHandler = require('../routerHandler/publish')

// 1. 导入验证表单数据的中间件
const expressJoi = require('@escook/express-joi')
// 2. 导入需要的验证规则对象
const { publish_article_validate } = require('../validate/publish')

//发布文章
router.post('/publish', expressJoi(publish_article_validate), publishHandler.publishArticle)

//获取所有视频
router.get('/getAllPublish', publishHandler.getAllPublish)

module.exports = router